home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / private / _getscrn.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  64 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef PDCDEBUG
  5. char *rcsid__getscrn = "$Header: C:\CURSES\private\RCS\_getscrn.c 2.1 1993/06/18 20:23:25 MH Rel MH $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*man-start*********************************************************************
  12.  
  13.   PDC_get_scrn_mode()    - Return the current BIOS video mode
  14.  
  15.   PDCurses Description:
  16.      This is a private PDCurses routine.
  17.  
  18.      Returns the current BIOS Video Mode Number.
  19.  
  20.   PDCurses Return Value:
  21.      This function returns OK on success and ERR on error.
  22.  
  23.   PDCurses Errors:
  24.      The FLEXOS version of this routine returns an ERR.
  25.  
  26.   Portability:
  27.      PDCurses    int PDC_get_scrn_mode( void );
  28.  
  29. **man-end**********************************************************************/
  30.  
  31. #ifdef     OS2
  32. VIOMODEINFO    PDC_get_scrn_mode(void)
  33. #else
  34. int    PDC_get_scrn_mode(void)
  35. #endif
  36. {
  37. #ifdef     OS2
  38.     VIOMODEINFO vioModeInfo;
  39. #endif
  40.  
  41. #ifdef PDCDEBUG
  42.     if (trace_on) PDC_debug("PDC_get_scrn_mode() - called\n");
  43. #endif
  44.  
  45. #ifdef    FLEXOS
  46.     return( ERR );
  47. #endif
  48.  
  49. #ifdef    DOS
  50.     regs.h.ah = 0x0f;
  51.     int86(0x10, ®s, ®s);
  52.     return ((int) regs.h.al);
  53. #endif
  54.  
  55. #ifdef     OS2
  56.     VioGetMode (&vioModeInfo, 0);
  57.     return vioModeInfo;
  58. #endif
  59.  
  60. #ifdef UNIX
  61.     return(0); /* this is N/A */
  62. #endif
  63. }
  64.